home *** CD-ROM | disk | FTP | other *** search
/ Nautilus 1992 July / Nautilus-3-8 / Nautilus-3-8.bin / Tools & Utilities / Techy Stuff / Doco ƒ / CSMP ƒ / CSMP-V1-056.TXT < prev    next >
Encoding:
Text File  |  1992-06-03  |  50.1 KB  |  1,424 lines

  1. C.S.M.P. Digest             Tue, 21 Apr 92       Volume 1 : Issue 56
  2.  
  3. Today's Topics:
  4.  
  5.     Page flipping
  6.     How to write serial port handling code?
  7.     Mounting AppleShare volumes?
  8.     Object Question
  9.     QuickDraw Regions
  10.     QuickTime Development Question.
  11.     think-c warning : "code overflow", wazzit mean?
  12.     Naming a Print Monitor job
  13.     Seeking Apple File Exchange translator coding guide?
  14.     Sending AppleEvents..
  15.     A/UX 2.0.1 problem
  16.     SndPlayFromDisk buffer size?
  17.     Think C 4.0: debugger crashes on LC
  18.     Apple Event Max Size Query
  19.  
  20.  
  21. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  22.  
  23. These digests are available (by using FTP, account anonymous, your email
  24. address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
  25. edu.  This is also the home of the comp.sys.mac.programmer Frequently Asked
  26. Questions list.  The last several issues of the digest are available from
  27. sumex-aim.stanford.edu as well.
  28.  
  29. These digests are also available via email.  Just send a note saying that you
  30. want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
  31. automatically receive each new digest as it is created.
  32.  
  33. The articles in these digests are taken directly from comp.sys.mac.programmer.
  34. They are not edited; all articles included in this digest are in their original
  35. posted form.  The only articles that are -not- included in these digests are
  36. those which didn't receive any replies (except those that give information
  37. rather than ask a question).  All replies to each article are concatenated
  38. onto the original article in the order in which they were received.  Article
  39. threads are not added to the digests until the last article added to the
  40. thread is at least one month old (this is to ensure that the thread is dead
  41. before adding it to the digests).
  42.  
  43. Send administrative mail to mkelly@cs.uoregon.edu.
  44.  
  45. -------------------------------------------------------
  46.  
  47. From: mkelly@majestix.cs.uoregon.edu (Michael A. Kelly)
  48. Subject: Page flipping
  49. Organization: University of Oregon Computer and Information Sciences Dept.
  50. Date: Tue, 10 Mar 1992 10:26:16 GMT
  51.  
  52.  
  53. OK, I've been working on this for the last hour or so, and I can't seem to
  54. get any positive results.  Have any of you gotten page flipping to work on
  55. a Mac II?
  56.  
  57. The code below doesn't cause a crash, but it also doesn't seem
  58. to affect the screen.  A window the size of the GrayRgn is opened and filled
  59. with black, an offscreen PixMap is created with NewScreenBuffer, the main
  60. device's PixMap and the offscreen PixMap are switched, and then a small loop
  61. draws a red square in the middle of the screen.  The problem is that the
  62. red square doesn't show up if I switch the PixMaps.  It _does_ show up if
  63. I don't switch the PixMaps.
  64.  
  65. The drawing loop draws directly to the screen, using the routine found in
  66. the FAQ.
  67.  
  68. So, anyone have any ideas?  When and if I get it working, I'll post a tutorial.
  69.  
  70. Here's the code:
  71.  
  72. void main()
  73. {
  74.  
  75.     GDHandle        theDevice;
  76.     short           x, y;
  77.     Ptr             tempBaseAddr;
  78.     PixMapHandle    thePixMap;
  79.     PixMapHandle    tempPixMap;
  80.     OSErr           theErr;
  81.     
  82.     /* This routine opens a big black window */
  83.     
  84.     Initialize();
  85.         
  86.     theDevice = GetMainDevice();
  87.     
  88.     LockPixels( (*theDevice)->gdPMap );
  89.     
  90.     theErr = NewScreenBuffer( &(*theDevice)->gdRect, false, &theDevice,
  91.                               &thePixMap );
  92.     (*thePixMap)->baseAddr = StripAddress( (*thePixMap)->baseAddr );
  93.     
  94.     tempPixMap = (*theDevice)->gdPMap;
  95.     (*theDevice)->gdPMap = thePixMap;
  96.     thePixMap = tempPixMap;
  97.     
  98.     UnlockPixels( (*theDevice)->gdPMap );
  99.     
  100.     for ( x = 304; x < 336; ++ x ) {
  101.         for ( y = 224; y < 256; ++ y ) {
  102.             SetPixel( x, y, 0x00000023, (*theDevice)->gdPMap );
  103.         }
  104.     }
  105.  
  106.     while ( ! Button() ) {
  107.     }
  108.     
  109.     while ( Button() ) {
  110.     }
  111.     
  112.     LockPixels( (*theDevice)->gdPMap );
  113.     
  114.     tempPixMap = (*theDevice)->gdPMap;
  115.     (*theDevice)->gdPMap = thePixMap;
  116.     thePixMap = tempPixMap;
  117.     
  118.     UnlockPixels( (*theDevice)->gdPMap );
  119.  
  120.     DisposeScreenBuffer( thePixMap );
  121.     
  122.     /* This closes the window, etc. */
  123.     
  124.     ExitCleanup();
  125.  
  126. }
  127.  
  128.  
  129. Thanks for _any_ reply!!
  130.  
  131. Mike.
  132. - -- 
  133. _____________________________________________________________________________
  134. Michael A. Kelly                                         University of Oregon
  135. mkelly@cs.uoregon.edu                             Computer Science Department
  136. _____________________________________________________________________________
  137.  
  138. +++++++++++++++++++++++++++
  139.  
  140. From: deadman@garnet.berkeley.edu (Ben Haller)
  141. Date: 20 Mar 1992 01:35:44 GMT
  142. Organization: Stick Software
  143.  
  144. In article <1992Mar10.102616.2747@cs.uoregon.edu>
  145.    mkelly@majestix.cs.uoregon.edu (Michael A. Kelly) writes:
  146. >OK, I've been working on this for the last hour or so, and I can't seem to
  147. >get any positive results.  Have any of you gotten page flipping to work on
  148. >a Mac II?
  149.   I believe that in general page flipping is not possible.  If anyone
  150. knows better, I am *extremely* interested.  The documentation for the
  151. INIT "MaxApplZoom" has a very informative discussion of video cards
  152. and drivers and their capabilities, and the gist seems to be that
  153. some boards support vertical panning, which could be used to do
  154. page flipping if there is enough memory on the card, but that there is
  155. no standard way to do this on all cards or anything nice like that.
  156.  
  157. - -Ben Haller (deadman@garnet.berkeley.edu)
  158.  
  159. ---------------------------
  160.  
  161. From: Dermot.Bradley@bbs.oit.unc.edu (Dermot Bradley)
  162. Subject: How to write serial port handling code?
  163. Date: 15 Mar 92 19:04:14 GMT
  164. Organization: Extended Bulletin Board Service
  165.  
  166. Hi,
  167.  
  168. we are hoping to write code to handle a modem attached to the serial port but   
  169. we don't know where to begin. I've heard mention of the Communication Toolbox
  170. but we need to start ASAP and the CTB is supposed to take quite some time to
  171. get into.
  172.  
  173. Any help would be much appreciated,
  174.  
  175. Dermot Bradley
  176.  
  177. cfbm33@mgvax.ulster.ac.uk  <----- Preferred email address
  178. dermot.bradley@bbs.oit.unc.edu
  179.  
  180. - --
  181.    The opinions expressed are not necessarily those of the University of
  182.      North Carolina at Chapel Hill, the Campus Office for Information
  183.         Technology, or the Experimental Bulletin Board Service.
  184.            internet:  bbs.oit.unc.edu or 152.2.22.80
  185.  
  186. +++++++++++++++++++++++++++
  187.  
  188. From: glenn@gla-aux.uucp (Glenn Austin)
  189. Date: Sun, 15 Mar 92 17:18:13 PST
  190. Organization: The Pit Lane
  191.  
  192.  
  193. In article <1992Mar15.190414.18437@samba.oit.unc.edu> (comp.sys.mac.programmer), Dermot.Bradley@bbs.oit.unc.edu (Dermot Bradley) writes:
  194. > we are hoping to write code to handle a modem attached to the serial port but   
  195. > we don't know where to begin. I've heard mention of the Communication Toolbox
  196. > but we need to start ASAP and the CTB is supposed to take quite some time to
  197. > get into.
  198.  
  199. Not really -- most of the so-called "problems" associated with the CTB have
  200. to do with adapting existing serial code to work with the CTB.  In reality,
  201. using the CTB means that you don't have to do the hard work.  All you have
  202. to do is open the connection and monitor it.
  203.  
  204. ===============================================================================
  205. | Glenn L. Austin                | "Turn too soon, run out of room.           |
  206. | Macintosh Wizard and           |    Turn too late, much better fate."       |
  207. | Auto Racing Driver             |   -- Jim Russell Racing School Instructors |
  208. | Usenet:  glenn@gla-aux.uucp or glenn%gla-aux.uucp@skinner.cs.uoregon.edu    |
  209. ===============================================================================
  210.  
  211. +++++++++++++++++++++++++++
  212.  
  213. From: nick@dcs.ed.ac.uk (Nick Rothwell)
  214. Date: 16 Mar 92 14:43:49 GMT
  215. Organization: Friends of the Salter Duck
  216.  
  217. In article <1992Mar15.190414.18437@samba.oit.unc.edu> Dermot.Bradley@bbs.oit.unc.edu (Dermot Bradley) writes:
  218.  
  219.    I've heard mention of the Communication Toolbox
  220.    but we need to start ASAP and the CTB is supposed to take quite some time to
  221.    get into.
  222.  
  223. I wrote some code using the Comms Toolbox to drive a modem, just as a learning
  224. exercise. Took me one (1) day.
  225.  
  226. Nick.
  227. - --
  228. Nick Rothwell, LFCS, Edinburgh | "We know what to get *you* for
  229.              nick@dcs.ed.ac.uk |  Christmas: a double lobotomy and
  230. Mentation Consultancy Services |  ten rolls of rubber wallpaper."
  231.    cassiel@cix.compulink.co.uk |
  232.  
  233. +++++++++++++++++++++++++++
  234.  
  235. From: Bryan.Socha@f921.n273.z1.ieee.org (Bryan Socha)
  236. Date: 17 Mar 92 19:04:00 GMT
  237. Organization: FidoNet node 1:273/921 - Unseen Realit, Philadelphia PA
  238.  
  239.  
  240.  # we are hoping to write code to handle a modem attached to the
  241.  # serial port but
  242.  # we don't know where to begin. I've heard mention of the
  243.  # Communication Toolbox
  244.  # but we need to start ASAP and the CTB is supposed to take
  245.  # quite some time to
  246.  # get into.
  247.  
  248. I am doing the same thing..  basically there are several books, ctb is mainly
  249. a system 7 thing so you should look at the system 7 books and apple has a
  250. specific communications tookbox book... 
  251.  
  252. - --  
  253. =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
  254.  Bryan Socha - Internet: Bryan.Socha@f921.n273.z1.ieee.org
  255.  
  256. ---------------------------
  257.  
  258. From: cmcclary@indiana.edu (Charles McClary)
  259. Subject: Mounting AppleShare volumes?
  260. Organization: Indiana University
  261. Date: Fri, 13 Mar 92 19:51:45 GMT
  262.  
  263. I would like to mount an AppleShare volume from an application.  I have tried
  264. using the PBVolumeMount as explained in Vol. VI with no success.  I noticed, 
  265. on the net, that other people were having trouble with bugs in PBVolumeMount.
  266.  
  267. My question is how did people mount AppleShare volume for System 6.0.x and
  268. System 7.0.x?
  269.  
  270. Charles McClary
  271. cmcclary@indiana.edu
  272.  
  273. +++++++++++++++++++++++++++
  274.  
  275. From: dcastell@csg.uwaterloo.ca (David Castell)
  276. Date: 16 Mar 92 14:49:07 GMT
  277. Organization: Computer Systems Group
  278.  
  279. In article <1992Mar13.195145.8340@bronze.ucs.indiana.edu>, cmcclary@indiana.edu (Charles McClary) writes:
  280. > I would like to mount an AppleShare volume from an application.  I have tried
  281. > using the PBVolumeMount as explained in Vol. VI with no success.  I noticed, 
  282. > on the net, that other people were having trouble with bugs in PBVolumeMount.
  283. > My question is how did people mount AppleShare volume for System 6.0.x and
  284. > System 7.0.x?
  285. > Charles McClary
  286. > cmcclary@indiana.edu
  287. I have been able to get PBVolumeMount to work without many problems (except
  288. for volumes that require volume passwords because PBVolumeMount ignores the
  289. volume password field).  Supposedly AppleShare 3.0 drivers will implement a
  290. PBVolumeMount that will fix this problem and it can be used with System 6 or
  291. System 7.
  292.  
  293. There is another way to mount volumes in System 6 and System 7.  The MPW
  294. 'choose' tool uses this method for System 6, but it is not very pleasant.
  295. The method basically involves getting a special resource from the AppleShare
  296. drivers that is called the 'AppleShare Mounter'.  Using assembler you can
  297. set up the registers and call into this resource, which contains the code
  298. to do all of the work.  The catch is that the calls and how the registers
  299. are set up are currently undocumented by Apple.  They say they might release
  300. this information, but I wouldn't hold my breath.  For our software, we just
  301. hacked the code to see how to do it, but like I said, it is not nice code
  302. to look at.
  303.  
  304. Dave Castell
  305.  
  306. +++++++++++++++++++++++++++
  307.  
  308. From: IO92142@MAINE.MAINE.EDU (James)
  309. Date: 19 Mar 92 21:12:17 GMT
  310. Organization: University of Maine System
  311.  
  312. Hello.
  313. I'm writing for a friend that wanted to access files on a server
  314. from within 4-D.
  315. We want this to be as transparent as possible.  Meaning that
  316. the enduser does not have to share to the server that is going
  317. to be used.  The application will be able to retrieve files
  318. from the server in the background and it would appear as
  319. if the files were on the end users computer..
  320.  
  321. I've heard about PMVolumeMount but haven't used it.  Any suggestions
  322. as to what we should use will be greatly appreciated.
  323.  
  324. Thanks
  325. Jim Gray
  326. =-=-=-=-=-=--=-=-=-=
  327. James Gray                           Bitnet   :  IO92142@Maine
  328. University of Maine                  Internet :  IO92142@Maine.Maine.Edu
  329.  
  330. ---------------------------
  331.  
  332. From: edw@uucp.ogi.edu
  333. Subject: Object Question
  334. Date: 14 Mar 92 20:19:29 GMT
  335. Organization: Drexel University Guerrilla Networking Project
  336.  
  337. I'm familiar with the basics of OOP, but I can't figure out how to do what
  338. I want (I'm using THINK Pascal).
  339.  
  340. I've declared a class...
  341.  
  342.   ThreadErr = (none, done, died);
  343.  
  344.   CThread = object
  345.  
  346.     fName: string;
  347.     fThreadID: integer;
  348.     fPriority: integer;
  349.  
  350.     function Init: ThreadErr;
  351.     function DoIdle: ThreadErr;
  352.     function Kill: ThreadErr;
  353.     function Status: ThreadErr;
  354.     function SetPriority (thePriorty: integer): integer;
  355.     function GetPriority: integer;
  356.     function GetName: string;
  357.     function GetID: integer;
  358.     function SetID (theID: integer): integer;
  359.    end;
  360.  
  361. ...which is going to be used to represent threads (obviously). Now, the code
  362. for these things is going to reside in files (as code resources, I imagine).
  363. All of the code will be common except Init, DoIdle, Kill, SetPriority, and
  364. Status. How would I go about loading these routines and attaching them to
  365. the object? It seems a bit stupid to define sub-classes like CLoginThread,
  366. etc, since putting objects in data files seems very confusing. Any kind of
  367. comments on this situation would be appreciated.
  368.  
  369. Thanks,
  370.  
  371. - ---------
  372. Ed Watkeys                         "...if you wish to strive for peace of
  373. phlpa!caligula!edw@cs.widener.edu   soul and pleasure, then believe; if
  374. Drexel University (Comp Sci)        you wish to be a devotee of truth,
  375. Guerrilla Networking Project        then inquire...." -- Nietzsche
  376.  
  377. +++++++++++++++++++++++++++
  378.  
  379. From: jspencer@macgate.mn.org (Jim Spencer)
  380. Date: 17 Mar 92 03:54:43 GMT
  381.  
  382.  
  383.  ew> From: edw@uucp.ogi.edu
  384.  ew> Newsgroups: comp.sys.mac.programmer
  385.  ew> Organization: Drexel University Guerrilla Networking Project
  386.  ew> Reply-To: caligula!edw (Edwin Howell Watkeys III)
  387.  ew> Message-ID: <01050133.ufig01@caligula.uucp>
  388.  ew> 
  389.  ew> I'm familiar with the basics of OOP, but I can't figure out how to do
  390.  ew> what
  391.  ew> I want (I'm using THINK Pascal).
  392.  ew> 
  393.  ew> I've declared a class...
  394.  ew> 
  395.  ew>   ThreadErr = (none, done, died);
  396.  ew> 
  397.  ew>   CThread = object
  398.  ew> 
  399.  ew>     fName: string;
  400.  ew>     fThreadID: integer;
  401.  ew>     fPriority: integer;
  402.  ew> 
  403.  ew>     function Init: ThreadErr;
  404.  ew>     function DoIdle: ThreadErr;
  405.  ew>     function Kill: ThreadErr;
  406.  ew>     function Status: ThreadErr;
  407.  ew>     function SetPriority (thePriorty: integer): integer;
  408.  ew>     function GetPriority: integer;
  409.  ew>     function GetName: string;
  410.  ew>     function GetID: integer;
  411.  ew>     function SetID (theID: integer): integer;
  412.  ew>    end;
  413.  ew> 
  414.  ew>...which is going to be used to represent threads (obviously). Now, the
  415. code
  416.  ew>for these things is going to reside in files (as code resources, I
  417. imagine).
  418.  ew>All of the code will be common except Init, DoIdle, Kill, SetPriority, and
  419.  ew>Status. How would I go about loading these routines and attaching them to  
  420.  ew>the object? It seems a bit stupid to define sub-classes like CLoginThread,
  421.  ew>etc, since putting objects in data files seems very confusing. Any kind
  422.  ew>of comments on this situation would be appreciated.
  423.  
  424. It appears that you misunderstand how Object Pascal works.  The linker takes
  425. care of calling methods pretty much the same way it does for normal procedure
  426. calls.  All that changes is that there is a level of indirection to the call.
  427.  
  428. You are mixing up the concept of the "class" which you are defining above and
  429. the "object" itself which is an instance of a class.  The class is nothing 
  430. more than the definition of what an object will be once one is created.  In
  431. your program, you actually create the objects themselves in RAM, not on disk,
  432. using NEW.  One of the advantages of subclassing your CThread is that you 
  433. don't have to rewrite the code that is common.  You simply OVERRIDE the 
  434. methods that change.  The other advantage is that you can create the objects
  435. you need, for various types of threads in your case, and assign them to a 
  436. variable of type CThread.  You can then call say DoIdle or Kill for that
  437. variable without having to worry about having the right code being executed.
  438.  
  439. I recommend you pick up a copy of "Object Oriented Programming Power for 
  440. Think Pascal Programmers" by Chuck Sphar, published by Microsoft Press, 
  441. ISBN 1-55615-348-1.  The issues you raise are really beyond an answer here.
  442.  
  443. ---------------------------
  444.  
  445. From: Lund-Larsen/Eine
  446. Subject: QuickDraw Regions
  447. Organization: Scandinavian Customized Prosthesis
  448. Date: Mon, 16 Mar 92 18:10:13 GMT
  449.  
  450.  
  451.  
  452. We are working with QuickDraw regions and wonder if there are any
  453. possibilities of reading the region definition data.
  454. We are especially interested in getting access to points on the outline of the
  455. region.
  456.  
  457. Any help is appreciated.
  458.  
  459. Thanks
  460.  
  461. +++++++++++++++++++++++++++
  462.  
  463. From: vvann@umbio.med.miami.edu (Vince Vann)
  464. Date: 18 Mar 92 22:41:35 GMT
  465. Organization: University of Miami Medical School
  466.  
  467. Lund-Larsen/Eine writes:
  468.  
  469. >We are working with QuickDraw regions and wonder if there are any
  470. >possibilities of reading the region definition data.
  471. >We are especially interested in getting access to points on the outline of the
  472. >region.
  473.  
  474. >Any help is appreciated.
  475.  
  476. I once wrote a routine to parse through quickdraw region definitions.
  477. I no longer have the code, but fortunately I remember how quickdraw
  478. regions are encoded.  
  479.  
  480.                           *** WARNING ***
  481.  
  482. All of the information in this description is based on my own
  483. interpretation.  It is not derived from any documented sources. 
  484. I have attempted to summarize what I remember about quickdraw regions
  485. definitions, but you should verify the information for yourself by 
  486. parsing through several simple regions.  
  487.  
  488. Quickdraw Region Definitions
  489. - ----------------------------
  490. Basically, a region is encoded line by line from top to bottom as sets 
  491. of "pixel runs".  Redundancies are eliminated by only encoding information
  492. about those pixels which change from one horizonatal scan line to the
  493. next.  If you are familiar with scan line conversion algorithms or run
  494. length encoding compression algorithms, the idea is very similar.  
  495.  
  496. The actual region data consists of a list of signed integer pairs 
  497. that essentially encode horizontal runs of pixels that are to be
  498. turned ON (included within the region) or turned OFF (excluded from the
  499. region).  The runs are encoded by scan line from top to bottom.  The
  500. format for each line is as follows:
  501.  
  502.      <scan line> <start,stop> [... <start,stop>] <0x7fff>
  503.      <scan line> <start,stop> [... <start,stop>] <0x7fff>
  504.      ......
  505.      ......
  506.      <scan line> <start,stop> [... <start,stop>] <0x7fff>
  507.      <0x7fff>
  508.  
  509. The <start,stop> integer pairs indicate runs of pixels that must be
  510. toggled either ON/OFF depending on their current state.  Initially, a
  511. region is considered empty and all pixels are OFF.  All runs for the
  512. first scan line will therefore serve to turn ON pixels so that they will
  513. be included in the region.  On subsequent scan lines, pixel runs may
  514. toggle pixels either ON or OFF depending on their current state.  When
  515. there is no change from one scan line to another because the two lines
  516. share exactly the same pattern, the second scan line is not encoded.  
  517. This avoids redundancies in the region definition and saves a tremendous
  518. amount of space.  
  519.  
  520. Example 1
  521. - ---------
  522. Here is a simple example.  Say you want to encode a rectangle with
  523. X,Y coordinates 40,10,120,50.  The region would look something like
  524. the one below.  An 'x' indicates a pixel within the region, a '-' 
  525. or '|' indicates part of the region boundary.  
  526.  
  527.               40                      120
  528.             10 -------------------------
  529.                |xxxxxxxxxxxxxxxxxxxxxxx| 
  530.                |xxxxxxxxxxxxxxxxxxxxxxx|
  531.                |xxxxxxxxxxxxxxxxxxxxxxA|B
  532.                |xxxxxxxxxxxxxxxxxxxxxxx|
  533.                |xxxxxxxxxxxCxxxxxxxxxxx|
  534.             50 -------------------------
  535.                            D           
  536.  
  537. Since the boundaries of a region lie BETWEEN PIXELS like grid lines, 
  538. this region includes pixels 40-119 horizontally and 10-49 vertically.
  539. Horizontally, the right boundary occurs at grid line 120.  Therefore,
  540. pixel 119 (A) is in the region, but pixel 120 (B) is not.  Same thing
  541. vertically, pixel 49 (C) is within the region but pixel 50 (D) is not.  
  542.  
  543. The rectangular region in this example would be encoded as follows:
  544.  
  545.              10 - 40 120 0x7fff
  546.              50 - 40 120 0x7fff
  547.              0x7fff
  548.  
  549. Initially, the region is EMPTY and contains no pixels.  The first number
  550. [10] means that the top most extent of the region is at quickdraw
  551. coordinate 10.  The next number [40] means that pixels should be
  552. included on this line starting with pixel 40 until the end of the run
  553. [120] is reached.  Thus, pixel 119 gets included in the region but pixel 
  554. 120 is left out.  
  555.  
  556. The hexadecimal number <0x7fff> terminates encoding on line 10.  Now, 
  557. lines 11-49 are identical to line 10 so they are all left out of the
  558. region definition.  Pixels 40-119 will be included within the region 
  559. on each of these scan lines.  
  560.  
  561. The next number [50] indicates that at line 50 a change occurs in the 
  562. encoding pattern.  The next two numbers [40] [120] represent a run of
  563. pixels which must be toggled either ON/OFF.  Since pixels 40-119 were
  564. previously ON in scan line 49, they will be turned OFF.  The <0x7fff> 
  565. terminates encoding for line 50.  This effectively ends the definition 
  566. of our rectangular region which is marked by the final <0x7fff>.  
  567.  
  568. Example 2
  569. - ---------
  570. What kind of region do you get if you change the definition above by 
  571. inserting two extra lines as follows:
  572.  
  573.              10 - 40 120 0x7fff
  574.         >>>> 25 - 60 100 0x7fff   /* Excludes pixels 60-99 on */
  575.                                   /* scan lines 25 through 34 */
  576.         >>>> 35 - 60 100 0x7fff   /* Includes pixels 60-99 again */
  577.              50 - 40 120 0x7fff
  578.              0x7fff
  579.  
  580. Did you guess it?  It's the same rectangle with a hole in it...
  581.  
  582.                40    60       100     120
  583.              10-------------------------
  584.                |xxxxxxxxxxxxxxxxxxxxxxx|
  585.              25|xxxxxx----------xxxxxxx|
  586.                |xxxxxx|oooooooo|xxxxxxx|
  587.              35|xxxxxx----------xxxxxxx|
  588.                |xxxxxxxxxxxxxxxxxxxxxxx|
  589.              50-------------------------
  590.  
  591. The pixels marked 'x' are part of the region, the pixels marked 'o' are
  592. not part of the region.  Looks like a rectangular DONUT!!!
  593.  
  594. I hope all of this makes sense.  If you follow it, then you see that 
  595. quickdraw region encoding is very efficient and simple.  
  596.  
  597. Parsing Through a Region Definition
  598. - -----------------------------------
  599. To parse through a region, just remember that 'rgnSize' gives you the
  600. size of the region data in BYTES.  (rgnSize / 2) gives you the number of
  601. integers listed in the region definition.  This includes all of the scan
  602. line terminators <0x7fff> and the final <0x7fff> terminator as well. 
  603. Just parse through the integer array by scan line until you reach the
  604. final <0x7fff> teminator.  
  605.  
  606. Let me know if this helps, and good luck!
  607.  
  608. Vincent Vann
  609. (vvann@umbio.med.miami.edu)
  610. - -- 
  611.  
  612. +++++++++++++++++++++++++++
  613.  
  614. From: sam@staypuffed (Sam Griffith)
  615. Date: 19 Mar 92 04:35:47 GMT
  616. Organization: Pencom Software
  617.  
  618. In article <1992Mar18.224135.5203@umbio.med.miami.edu>  
  619. vvann@umbio.med.miami.edu (Vince Vann) writes:
  620. |> Lund-Larsen/Eine writes:
  621. |> 
  622. |> >We are working with QuickDraw regions and wonder if there are any
  623. |> >possibilities of reading the region definition data.
  624. |> >We are especially interested in getting access to points on the outline of  
  625. the
  626. |> >region.
  627. |> 
  628. |> >Any help is appreciated.
  629. |> 
  630. |> I once wrote a routine to parse through quickdraw region definitions.
  631. |> I no longer have the code, but fortunately I remember how quickdraw
  632. |> regions are encoded.  
  633. |> 
  634.  
  635. Middle chopped for brevity.....
  636.  
  637. |> Let me know if this helps, and good luck!
  638. |> 
  639. |> Vincent Vann
  640. |> (vvann@umbio.med.miami.edu)
  641. |> -- 
  642.  
  643.  
  644.  
  645. There was also a article in an old MacTutor mag. if I remember right.  You  
  646. might check there.
  647.  
  648. Sam Griffith Jr.
  649. Pencom Software
  650. sam@pencom.com
  651.  
  652. +++++++++++++++++++++++++++
  653.  
  654. From: sasdtm@stthomas.unx.sas.com (Donald T. Major)
  655. Date: 19 Mar 92 17:45:56 GMT
  656. Organization: SAS Institute Inc.
  657.  
  658. In article <1992Mar19.043547.10754@pencom.com>, sam@staypuffed (Sam Griffith) writes:
  659. |> In article <1992Mar18.224135.5203@umbio.med.miami.edu>
  660. |> vvann@umbio.med.miami.edu (Vince Vann) writes:
  661. |> |> Lund-Larsen/Eine writes:
  662. |> |>
  663. |> |> >We are working with QuickDraw regions and wonder if there are any
  664. |> |> >possibilities of reading the region definition data.
  665. |> |> >We are especially interested in getting access to points on the outline of
  666. |> the
  667. |> |> >region.
  668. |> |>
  669. |> |> >Any help is appreciated.
  670. |> |>
  671. |> |> I once wrote a routine to parse through quickdraw region definitions.
  672. |> |> I no longer have the code, but fortunately I remember how quickdraw
  673. |> |> regions are encoded.
  674. |> |>
  675. |>
  676. |> Middle chopped for brevity.....
  677. |>
  678. |> |> Let me know if this helps, and good luck!
  679. |> |>
  680. |> |> Vincent Vann
  681. |> |> (vvann@umbio.med.miami.edu)
  682. |> |> --
  683. |>
  684. |>
  685. |>
  686. |> There was also a article in an old MacTutor mag. if I remember right.  You
  687. |> might check there.
  688. |>
  689. |> Sam Griffith Jr.
  690. |> Pencom Software
  691. |> sam@pencom.com
  692.  
  693. Also note that the first example, using a solid rectangle, is not quite
  694. accurate--there is NO data after the rgnBBox field in this case, since
  695. the rectangle of rgnBBox is sufficient to describe the structure.  The
  696. size field similarly reflects this, saying that the total structure
  697. size is 10 bytes.  Additional "run" information is appended ONLY if a
  698. non-rectangular (solid) region is to be represented.
  699.  
  700.                                                          ..
  701.                                                         dtm
  702.  
  703. - -- 
  704. Donald Major       SAS Institute Inc.  "Cicely, let's fling something!"
  705. sasdtm@unx.sas.com SAS Campus Drive                 - Northern Exposure
  706. (919) 677-8000     Cary, NC 27513-2414
  707.  
  708. ---------------------------
  709.  
  710. From: newlin@cidmac.ecn.purdue.edu (Captain Kludge)
  711. Subject: QuickTime Development Question.
  712. Organization: Purdue University Engineering Computer Network
  713. Date: Mon, 16 Mar 1992 20:07:18 GMT
  714.  
  715. Does anyone know where I can find the THINK Pascal interface
  716. files for QuickTime?  Or has someone converted the MPW pascal
  717. interface files to THINK Pascal?
  718.  
  719. Thanks,
  720.  
  721. - -John
  722.  
  723. { newlin@ecn.purdue.edu }
  724.  
  725.  
  726. +++++++++++++++++++++++++++
  727.  
  728. From: IO92142@MAINE.MAINE.EDU (James)
  729. Date: 19 Mar 92 21:15:33 GMT
  730. Organization: University of Maine System
  731.  
  732. Hi.  I'd like any info on the QT Pascal question also.
  733. Could you forward?
  734. Thanks.
  735. Jim Gray
  736. =-=-=-=-=-=--=-=-=-=
  737. James Gray                           Bitnet   :  IO92142@Maine
  738. University of Maine                  Internet :  IO92142@Maine.Maine.Edu
  739.  
  740. ---------------------------
  741.  
  742. From: mike@zorch.SF-Bay.ORG (Mike Smithwick)
  743. Subject: think-c warning : "code overflow", wazzit mean?
  744. Organization: SF-Bay Public-Access Unix
  745. Date: Tue, 17 Mar 1992 18:21:01 GMT
  746.  
  747. []
  748.  
  749. I want to staticly define an array of about 28K in size (a trig lookup table),
  750. but Think gives me the warning of "Code Overflow", which is not listed anywhere
  751. in the manual. What does code-overflow mean? (the module is less then the
  752. 32K segment size).
  753.  
  754. mike
  755.  
  756. - -- 
  757. "There is no problem too big that can't be solved with high explosives"-Rush
  758.  
  759. Mike Smithwick - ames!zorch!mike
  760.  
  761.  
  762. +++++++++++++++++++++++++++
  763.  
  764. From: e-sink@uiuc.edu (Eric W. Sink)
  765. Date: 17 Mar 92 20:48:57 GMT
  766. Organization: University of Illinois at Urbana-Champaign
  767.  
  768. In <1992Mar17.182101.18649@zorch.SF-Bay.ORG> mike@zorch.SF-Bay.ORG (Mike Smithwick) writes:
  769.  
  770. >I want to staticly define an array of about 28K in size (a trig lookup table),
  771. >but Think gives me the warning of "Code Overflow", which is not listed anywhere
  772. >in the manual. What does code-overflow mean? (the module is less then the
  773. >32K segment size).
  774.  
  775. Look in Appendix C.  The error message means that you have tried to put more
  776. than 32k of code or data in a single file.
  777.  
  778. - -- 
  779. Eric W. Sink,  Spatial Analysis and Systems Team
  780. USACERL, P.O. Box 9005, Champaign, IL 61826-9005
  781. 1-800-USA-CERL x449,   e-sink@uiuc.edu
  782.  
  783. +++++++++++++++++++++++++++
  784.  
  785. From: ts@cup.portal.com (Tim W Smith)
  786. Date: 19 Mar 92 05:42:31 GMT
  787. Organization: The Portal System (TM)
  788.  
  789. >I want to staticly define an array of about 28K in size (a trig lookup table),
  790. >but Think gives me the warning of "Code Overflow", which is not listed anywhere
  791. >in the manual. What does code-overflow mean? (the module is less then the
  792. >32K segment size).
  793.  
  794. It is too listed in the manual, right where you would expect to find it in
  795. the alphabetical listing of error messages and their meanings.
  796.  
  797. ---------------------------
  798.  
  799. From: kamprath@caen.engin.umich.edu (Michael F. Kamprath)
  800. Subject: Naming a Print Monitor job
  801. Date: Wed, 18 Mar 92 01:27:28 EST
  802. Organization: The University of Michigan 
  803.  
  804. I have a program (in THINK C 4.whatever) that can only open one file at a time.
  805. The program has four windows open at a time for any one file.  Now, my
  806. print routine compiles data from all four windows to produce a single
  807. print document (the program is a simple CAD program, and it prints plans). 
  808.  
  809. Here is my problem:  How do I get the document name in the Print Monitor
  810. window to be the same as the current filename?  I have notice that the
  811. name that does show up to be either "Unspecified" or the name of the current
  812. top window (whose name is not dependent on the filename).  Is their
  813. anyway to set a document name in the print record?  I only have IM 1-3, and
  814. never mentions naming a document to be printed.
  815.  
  816. Help is greatly appreciated.
  817.  
  818. Michael F. Kamprath
  819. kamprath@caen.engin.umich.edu
  820.  
  821.  
  822. +++++++++++++++++++++++++++
  823.  
  824. From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
  825. Organization: Kalamazoo College
  826. Date: Wed, 18 Mar 1992 13:17:42 GMT
  827.  
  828. kamprath@caen.engin.umich.edu (Michael F. Kamprath) writes:
  829. >The program has four windows open at a time for any one file.  Now, my
  830. >print routine compiles data from all four windows to produce a single
  831. >print document
  832. >
  833. >Here is my problem:  How do I get the document name in the Print Monitor
  834. >window to be the same as the current filename?  I have notice that the
  835. >name that does show up to be either "Unspecified" or the name of the current
  836. >top window (whose name is not dependent on the filename).
  837.  
  838. I understand that the Print Manager grabs the name of the topmost window
  839. for the name of the print job.  If you turn background printing off and
  840. have two people print at the same time, the one who's waiting will get a
  841. status report for the other, something like "User: Fred; document:
  842. NameOfFred'sTopmostWindow; page 1 of 6."  I would imagine the
  843. PrintMonitor uses the same trick.
  844.  
  845. The standard thing to do (I hear) is to create an offscreen window,
  846. give it the name you want, and bring it to the front before calling the
  847. Print Manager.  Kill it afterwards, of course.  If you have a status
  848. window ("Now printing page x of y"), give it the appropriate name.
  849. - -- 
  850.  Jamie McCarthy     Internet: k044477@kzoo.edu     AppleLink: j.mccarthy
  851.  Kzoo randomly kills all my mail;  if I don't acknowledge, try resending.
  852.  If enough people use "#include <stddisclaimer.h>", it will _become_ the
  853.  standard disclaimer, and all the lawyers will go into infinite recursion.
  854.  
  855. +++++++++++++++++++++++++++
  856.  
  857. From: pbrande1@cc.swarthmore.edu (Philip Brandenberger)
  858. Organization: Swarthmore College
  859. Date: Thu, 19 Mar 1992 20:24:07 GMT
  860.  
  861. The important thing here is that the window be in front (topmost) when
  862. PrValidate is called.  This is when the windowname is stolen by the
  863. print manager.  A tech note on the subject suggests a dialog (with a
  864. dbprocbox) which informs the user that printing is in progress while also
  865. having the name of the document you are printing (which isn't shown 'cause
  866. a dbprocbox doesn't have a titlebar).
  867.  
  868. The alternate solution is to have either a) and offscreen window as suggested
  869. above, or as the tech note suggests a window under the menu bar.
  870.  
  871. Note that printmonitor is irrelevant to the question; the document name
  872. is taken when the document is spooled by the application.  The username
  873. is taken when printmonitor prints the spool file, as is the app name.
  874. These last two seem to be stupid oversights in the printing/printmonitor
  875. code, IMHO.  [Why not when you're recording the printer name and the
  876. document name also record the user name and the application name so
  877. Printmonitor gets it all right?]
  878.  
  879. To use an overused phrase, "Cheers,"
  880.  
  881. Phil
  882.  
  883.  
  884. - -- 
  885. Philip J. Brandenberger
  886. Swarthmore College, but I don't speak for it, usually against it.
  887. pbrande1@cc.swarthmore.edu
  888.  
  889. ---------------------------
  890.  
  891. From: ctvien@concour.cs.concordia.ca (VIEN cam thanh)
  892. Subject: Seeking Apple File Exchange translator coding guide?
  893. Date: 18 Mar 92 16:32:39 GMT
  894. Organization: Concordia University, Montreal, Quebec
  895.  
  896. is there documentation which will allow me to write translator
  897. for the Apple File Exchange?
  898.  
  899.  
  900. Thanks in advance
  901.  
  902.  
  903.  
  904.  
  905. Cam
  906.  
  907. +++++++++++++++++++++++++++
  908.  
  909. From: blob@Apple.COM (Brian Bechtel)
  910. Date: 19 Mar 92 15:56:25 GMT
  911. Organization: Apple Computer Inc., Cupertino, CA
  912.  
  913. ctvien@concour.cs.concordia.ca (VIEN cam thanh) writes:
  914.  
  915. >is there documentation which will allow me to write translator
  916. >for the Apple File Exchange?
  917.  
  918. Apple File Exchange Technical Reference Package v1.1, $30.00 US, from
  919. APDA.  Part number M7051.
  920.  
  921. apda@applelink.apple.com
  922. 800-282-2732 USA
  923. 800-637-0029 Canada
  924. 408-562-3910
  925. 408-562-3971 Fax
  926.  
  927. - --Brian Bechtel     blob@apple.com     "My opinion, not Apple's"
  928.  
  929. ---------------------------
  930.  
  931. From: mas@boulder.colorado.edu (Mark A. Steele)
  932. Subject: Sending AppleEvents..
  933. Date: 18 Mar 92 18:08:03 GMT
  934. Organization: National Geophyical Data Center, Boulder, Colorado
  935.  
  936. I am trying to send an Apple Event to another application to tell it
  937. to open a specific document. Looking at inside Mac VI I began working
  938. backwards. First I create the Apple Event to send, then I created
  939. a list and added the FSSpec of the file to that list. I added this
  940. list to the apple event and sent it away. Creating and sending generated
  941. no errors. The receiving program (using MacApp 3.0) gets the event but
  942. is unable to get the FSSpec out of the event.
  943. My feeling is that the way I am sending the event (or creating it) is
  944. incorrect. Could somebody please brief out how I should create the
  945. event once I have the FSSpec that I colletec from StandardGetFile();
  946.  
  947. - -Mark
  948. mas@rimmer.colorado.edu
  949.  
  950. +++++++++++++++++++++++++++
  951.  
  952. From: eric_berdahl@taligent.com (Eric Berdahl)
  953. Date: 19 Mar 92 22:53:55 GMT
  954. Organization: Taligent, Inc.
  955.  
  956. In article <1992Mar18.180803.5730@colorado.edu>, mas@boulder.colorado.edu (Mark A. Steele) writes:
  957. > [Description of sending an Open Document AppleEvent by packaging up an FSSpec deleted]
  958.  
  959. The Open Document AppleEvent does not take an FSSpec for its direct parameter.  Instead, you
  960. should take the FSSpec you create, make an alias (NewAlias or NewAliasMinimal), and package the
  961. - --ALIAS-- into the AppleEvent.  Then it should work like a charm.
  962.  
  963. Eric
  964. - --
  965. Internet: eric_berdahl@taligent.com
  966. AppleLink: BERDAHL
  967. MaBell: (408) 862-6280
  968.  
  969.  
  970. ---------------------------
  971.  
  972. From: dorner@pequod.cso.uiuc.edu (Steve Dorner)
  973. Subject: A/UX 2.0.1 problem
  974. Date: 18 Mar 92 19:01:02 GMT
  975. Organization: University of Illinois at Urbana-Champaign
  976.  
  977.  
  978. I have a little program (MPW C 3.2):
  979.  
  980.   #include "itall.h"
  981.   main()
  982.   {
  983.     long resp;
  984.     if (!Gestalt(gestaltOSAttr,&resp) && resp&(1L<<gestaltLaunchControl))
  985.     {
  986.       ProcessSerialNumber me, him;
  987.       GetCurrentProcess(&me);
  988.       GetFrontProcess(&him);
  989.     }
  990.   } 
  991.  
  992. This little program crashes (bus error) under A/UX 2.0.1, when it gets to the
  993. "GetFrontProcess" call.
  994.  
  995. Am I doing something wrong, or is this an A/UX bug?  A little birdie tells
  996. me it's probably an A/UX 2.0.1 bug that's fixed in A/UX 3.0, but I'm still
  997. curious.  I was unable to find any warnings about A/UX and the process
  998. manager in IM or the technotes (at least the ones I have).  Besides,
  999. I thought Gestalt would tell me all I needed to know?
  1000.  
  1001. - -- 
  1002. Steve Dorner, U of Illinois Computing Services Office
  1003. Internet: s-dorner@uiuc.edu  UUCP: uunet!uiucuxc!uiuc.edu!s-dorner
  1004.  
  1005. +++++++++++++++++++++++++++
  1006.  
  1007. From: jcav@quads.uchicago.edu (JohnC)
  1008. Organization: The Royal Society for Putting Things on Top of Other Things
  1009. Date: Wed, 18 Mar 1992 21:27:00 GMT
  1010.  
  1011. In article <1992Mar18.190102.10382@ux1.cso.uiuc.edu> s-dorner@uiuc.edu (Steve Dorner) writes:
  1012. >
  1013. >I have a little program (MPW C 3.2):
  1014. >
  1015. >  #include "itall.h"
  1016. >  main()
  1017. >  {
  1018. >    long resp;
  1019. >    if (!Gestalt(gestaltOSAttr,&resp) && resp&(1L<<gestaltLaunchControl))
  1020. >    {
  1021. >      ProcessSerialNumber me, him;
  1022. >      GetCurrentProcess(&me);
  1023. >      GetFrontProcess(&him);
  1024. >    }
  1025. >  } 
  1026. >
  1027. >This little program crashes (bus error) under A/UX 2.0.1, when it gets to the
  1028. >"GetFrontProcess" call.
  1029.  
  1030. Apple has stated that A/UX versions prior to 3.0 don't support any Mac OS
  1031. features specific to System 7.  I have no clue as to why Gestalt lied in
  1032. this case.  Maybe it is being confused by the A/UX implementation of the
  1033. early proto-Process Manager inside Multifinder?
  1034.  
  1035.  
  1036. - -- 
  1037. John Cavallino                  |  EMail: jcav@midway.uchicago.edu
  1038. University of Chicago Hospitals |         John_Cavallino@uchfm.bsd.uchicago.edu
  1039. Office of Facilities Management | USMail: 5841 S. Maryland Ave, MC 0953
  1040. B0 f++ c+ g+ k s+(+) e+ h- pv   |         Chicago, IL  60637
  1041.  
  1042. +++++++++++++++++++++++++++
  1043.  
  1044. From: d88-jwa@hemul.nada.kth.se (Jon W{tte)
  1045. Date: 19 Mar 92 12:12:59 GMT
  1046. Organization: Royal Institute of Technology, Stockholm, Sweden
  1047.  
  1048. > dorner@pequod.cso.uiuc.edu (Steve Dorner) writes:
  1049.  
  1050.    I have a little program (MPW C 3.2):
  1051.  
  1052.        {
  1053.      ProcessSerialNumber me, him;
  1054.      GetCurrentProcess(&me);
  1055.      GetFrontProcess(&him);
  1056.        }
  1057.  
  1058.    This little program crashes (bus error) under A/UX 2.0.1, when it gets
  1059.    to the "GetFrontProcess" call.
  1060.  
  1061. That's not surprising. GetFrontProcess looks like a system-7-process-
  1062. manager call. A/UX 2.0.1 only has MultiFinder 6.1...
  1063.  
  1064. Maybe you test for the wrong gestalt bit, or gestalt returns erraneous
  1065. results ?
  1066.  
  1067. - -- 
  1068. This signature is placed into the Public Domain by Jon W{tte (h+@nada.kth.se)
  1069.                      - The worlds only romantic cynic -
  1070.  
  1071. ---------------------------
  1072.  
  1073. From: Jochen.Meyer@arbi.informatik.uni-oldenburg.de (Jochen Meyer)
  1074. Subject: SndPlayFromDisk buffer size?
  1075. Date: 19 Mar 92 16:07:12 GMT
  1076. Organization: University of Oldenburg, Germany
  1077.  
  1078. I am writing an application which is intended to play sampled sounds with
  1079. as little memory usage a possible. The play-from-disk routines seemed to
  1080. be the solution. Yet they require some buffer in memory.
  1081.  
  1082. My question: Which size should this buffer be?
  1083.  
  1084. In Inside Macintosh, Vol. 6, there is just some sample code which has a
  1085. buffer of 16k, but this seems to be too little for big sounds!?
  1086.  
  1087. It might be worth mentioning that the sounds to be played back are
  1088. 1:6 compressed.
  1089.  
  1090. Thanks for answers
  1091.  
  1092. Jochen
  1093.  
  1094. +++++++++++++++++++++++++++
  1095.  
  1096. From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
  1097. Date: 20 Mar 92 09:25:58 +1200
  1098. Organization: University of Waikato, Hamilton, New Zealand
  1099.  
  1100. In article <1992Mar19.161313.16481@arbi.informatik.uni-oldenburg.de>, Jochen.Meyer@arbi.informatik.uni-oldenburg.de (Jochen Meyer) writes:
  1101. > I am writing an application which is intended to play sampled sounds with
  1102. > as little memory usage a possible. The play-from-disk routines seemed to
  1103. > be the solution. Yet they require some buffer in memory.
  1104. >
  1105. > My question: Which size should this buffer be?
  1106. >
  1107. > In Inside Macintosh, Vol. 6, there is just some sample code which has a
  1108. > buffer of 16k, but this seems to be too little for big sounds!?
  1109.  
  1110. It doesn't matter about the size of the sound. The Sound Manager will
  1111. just read a bufferful at a time off disk. Bigger buffers => fewer reads,
  1112. but more memory consumed. The tradeoff is largely up to you.
  1113.  
  1114. > It might be worth mentioning that the sounds to be played back are
  1115. > 1:6 compressed.
  1116.  
  1117. I have successfully played both compressed and uncompressed sounds of
  1118. several tens of seconds duration (i e lots bigger than would fit in my
  1119. buffers), using SndStartFilePlay. You just call it the way it's documented,
  1120. and let it figure out all the low-level details.
  1121.  
  1122. Lawrence D'Oliveiro                       fone: +64-7-856-2889
  1123. Computer Services Dept                     fax: +64-7-838-4066
  1124. University of Waikato            electric mail: ldo@waikato.ac.nz
  1125. Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
  1126.  
  1127. ---------------------------
  1128.  
  1129. From: oldham_r@cs.uwa.oz.au (rob oldham)
  1130. Subject: Think C 4.0: debugger crashes on LC
  1131. Organization: Dept. Computer Science, University of Western Australia.
  1132. Date: Fri, 20 Mar 1992 03:40:18 GMT
  1133.  
  1134.   I am running ThinkC 4.0 on my LC running system 7. For some reason
  1135. the debugger refuses to work - it hangs the machine every time. It 
  1136. was also doing the same thing when I was running system 6.x when I
  1137. originally got the LC.
  1138.  
  1139.   I can't quite afford an upgrade to ThinkC 5.0 or whatever, but
  1140. would really like a quick fix if it exists.
  1141.  
  1142. Thanks a heap,
  1143.  
  1144. Rob.
  1145.  
  1146.  
  1147. +++++++++++++++++++++++++++
  1148.  
  1149. From: ejhill@athena.mit.edu (Ernest J Hill)
  1150. Organization: Massachusetts Institute of Technology
  1151. Date: Fri, 20 Mar 1992 05:00:34 GMT
  1152.  
  1153. This really should be in the FAQ list by now.  Think C 4.0 is NOT 100% Sys 7
  1154. compatible. In particular, the debugger is hopeless.  There are free updates
  1155. downloadable from (I think) sumex, and certainly from other sites (that's how
  1156. I got mine, by ftp.) The upgrade also fixes some problems in the ANSI scanf()
  1157. functions, and some TCL stuff too. The last 4.0 upgrade is numbered 4.0.5.
  1158.  
  1159.                         --Foss Hill
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167. ---------------------------
  1168.  
  1169. From: smoke@well.sf.ca.us (Nicholas Jackiw)
  1170. Subject: Apple Event Max Size Query
  1171. Date: 24 Feb 92 18:09:33 GMT
  1172. Organization: Whole Earth 'Lectronic Link, Sausalito, CA
  1173.  
  1174.  
  1175. I'm trying to send large amounts of data across the network with
  1176. Apple Events.  The data contents are microphone-recorded sound,
  1177. so I have little ability to predetermine their length.  It seems
  1178. that my client app fails to send the event if its too large (bigger
  1179. than 64K, empirically); AESend returns error -92 (ddpLenErr).  So
  1180. apparently I need to break up the sound into multiple events and
  1181. collate them on the server.
  1182.  
  1183. My question is, how can the application determine the maximum size?
  1184. Is 64K a constant enforced by the AEMgr, or does it depend on some
  1185. lower-level transport that might vary?  Or is it configuration
  1186. dependent, like how much room the system heap has available in which
  1187. to grow?
  1188.  
  1189. I'd like to send as large a unit as possible,  under the assumption
  1190. that there is lower-level chunkification going on anyway.  I can't
  1191. find any discussion of maximum message size in the AEMgr or High
  1192. Level Event Mgr documentation of IM#6. I can post code if it would
  1193. clarify, but it's a simple AESend()...
  1194.  
  1195. As always, thanks...
  1196.  
  1197.  
  1198.  
  1199. - -------------------------
  1200.  
  1201. From: lai@Apple.COM (Ed Lai)
  1202. Subject:  Apple Event Max Size Query
  1203. Date: 24 Feb 92 20:10:41 GMT
  1204. Organization: Apple Computer Inc., Cupertino, CA
  1205.  
  1206. In article <30166@well.sf.ca.us> smoke@well.sf.ca.us (Nicholas Jackiw) writes:
  1207. >
  1208. >I'm trying to send large amounts of data across the network with
  1209. >Apple Events.  The data contents are microphone-recorded sound,
  1210. >so I have little ability to predetermine their length.  It seems
  1211. >that my client app fails to send the event if its too large (bigger
  1212. >than 64K, empirically); AESend returns error -92 (ddpLenErr).  So
  1213. >apparently I need to break up the sound into multiple events and
  1214. >collate them on the server.
  1215. >
  1216. >My question is, how can the application determine the maximum size?
  1217. >Is 64K a constant enforced by the AEMgr, or does it depend on some
  1218. >lower-level transport that might vary?  Or is it configuration
  1219. >dependent, like how much room the system heap has available in which
  1220. >to grow?
  1221. >
  1222. >I'd like to send as large a unit as possible,  under the assumption
  1223. >that there is lower-level chunkification going on anyway.  I can't
  1224. >find any discussion of maximum message size in the AEMgr or High
  1225. >Level Event Mgr documentation of IM#6. I can post code if it would
  1226. >clarify, but it's a simple AESend()...
  1227. >
  1228. >As always, thanks...
  1229.  
  1230. There is a 64K limit due to the High Level Event Manager.
  1231.  
  1232. /* Disclaimer: All statments and opinions expressed are my own */
  1233. /* Edmund K. Lai                                               */
  1234. /* Apple Computer, MS37-UP                                     */
  1235. /* 20525 Mariani Ave,                                          */
  1236. /* Cupertino, CA 95014                                         */
  1237. /* (408)974-6272                                               */
  1238. zW@h9cOi
  1239.  
  1240.  
  1241.  
  1242.  
  1243. - -------------------------
  1244.  
  1245. From: potts@itl.itd.umich.edu (Paul Potts)
  1246. Subject:  Apple Event Max Size Query
  1247. Date: 25 Feb 92 20:18:33 GMT
  1248. Organization: Instructional Technology Laboratory, University of Michigan
  1249.  
  1250. In article <30166@well.sf.ca.us> smoke@well.sf.ca.us (Nicholas Jackiw) writes:
  1251. >
  1252. >I'm trying to send large amounts of data across the network with
  1253. >Apple Events.  The data contents are microphone-recorded sound,
  1254. >so I have little ability to predetermine their length.  It seems
  1255. >that my client app fails to send the event if its too large (bigger
  1256. >than 64K, empirically); 
  1257.  
  1258. >From my conversation with Jon Pugh I have heard that AppleEvents cannot
  1259. be larger than 64K. This is apparently a bug (or missing feature) and
  1260. they are indeed supposed to carry more data.
  1261.  
  1262. I'd be interesting in hearing about what you're doing. I have written
  1263. code which sends commands to play sounds over the network, and the next
  1264. step I was considering was sending digitized sounds (adding data chunks
  1265. to the AE).
  1266.  
  1267. -Paul-
  1268.  
  1269.  
  1270. -- 
  1271.          -Paul Potts-potts@itl.itd.umich.edu- 
  1272. "Wrong is wrong, even if it helps you." - Popeye
  1273.  
  1274.  
  1275.  
  1276. - -------------------------
  1277.  
  1278. From: keith@Apple.COM (Keith Rollin)
  1279. Subject:  Apple Event Max Size Query
  1280. Date: 2 Mar 92 22:01:43 GMT
  1281. Organization: Apple Computer Inc., Cupertino, CA
  1282.  
  1283. In article <1992Feb25.201833.14054@terminator.cc.umich.edu> potts@itl.itd.umich.edu (Paul Potts) writes:
  1284. >In article <30166@well.sf.ca.us> smoke@well.sf.ca.us (Nicholas Jackiw) writes:
  1285. >>
  1286. >>I'm trying to send large amounts of data across the network with
  1287. >>Apple Events.  The data contents are microphone-recorded sound,
  1288. >>so I have little ability to predetermine their length.  It seems
  1289. >>that my client app fails to send the event if its too large (bigger
  1290. >>than 64K, empirically); 
  1291. >
  1292. >From my conversation with Jon Pugh I have heard that AppleEvents cannot
  1293. >be larger than 64K. This is apparently a bug (or missing feature) and
  1294. >they are indeed supposed to carry more data.
  1295.  
  1296. Paul,
  1297.  
  1298. I think that you might have misunderstood your conversation with Jon.
  1299. Yes, its true that you cannot send more than 64K of data with Apple
  1300. events, but there is nothing in the Apple event Manager, per se, that
  1301. makes this limitation. Nor is it a bug. Rather, the Apple event Manager
  1302. currently uses the Hight Level Event Manager for its transport
  1303. mechanism. It is the High Level Event Manager that imposes the 64K
  1304. limit, which is in accordance with the design of the HLEventMgr. If the
  1305. transport layer were to support more than 64K, then so would the Apple
  1306. event Manager. However, there is no bug or missing feature; it's just
  1307. a matter of the weakest link in the chain.
  1308.  
  1309. -- 
  1310. - ----------------------------------------------------------------------------
  1311. Keith Rollin           ---            <Taligent .signature under construction>
  1312. Disclaimer: Pretty soon, I really _won't_ be speaking for Apple...
  1313.  
  1314.  
  1315.  
  1316. - -------------------------
  1317.  
  1318. From: jpugh@apple.com (Jon Pugh)
  1319. Date: 5 Mar 92 20:51:10 GMT
  1320. Organization: Apple Co.
  1321.  
  1322. In article <1992Feb25.201833.14054@terminator.cc.umich.edu>, potts@itl.itd.umich.edu (Paul Potts) writes:
  1323. > From my conversation with Jon Pugh I have heard that AppleEvents cannot
  1324. > be larger than 64K. This is apparently a bug (or missing feature) and
  1325. > they are indeed supposed to carry more data.
  1326.  
  1327. The High Level Event Manager is the one imposing the 64K restriction for all
  1328. events and a lot of us want it fixed.
  1329.  
  1330. Jon
  1331.  
  1332. +++++++++++++++++++++++++++
  1333.  
  1334. From: potts@itl.itd.umich.edu (Paul Potts)
  1335. Date: 5 Mar 92 16:45:36 GMT
  1336. Organization: Instructional Technology Laboratory, University of Michigan
  1337.  
  1338. In article <63412@apple.Apple.COM> keith@Apple.COM (Keith Rollin) writes:
  1339. >In article <1992Feb25.201833.14054@terminator.cc.umich.edu> potts@itl.itd.umich.edu (Paul Potts) writes:
  1340. >
  1341. >Paul,
  1342. >
  1343. >I think that you might have misunderstood your conversation with Jon.
  1344.  
  1345. I did misunderstand. My impression was that the bottleneck was in the AE 
  1346. Manager. (I haven't read all of I-M 6 yet, so I haven't gotten to the
  1347. innards of the High-Level Event Manager...)
  1348.  
  1349. Jon also said, I believe, that it would probably be fixed, but
  1350. he couldn't say when.
  1351.  
  1352. >Yes, its true that you cannot send more than 64K of data with Apple
  1353. >events, but there is nothing in the Apple event Manager, per se, that
  1354. >makes this limitation. Nor is it a bug. 
  1355.  
  1356. Well, missing feature then? 
  1357.  
  1358. >Rather, the Apple event Manager
  1359. >currently uses the Hight Level Event Manager for its transport
  1360. >mechanism. It is the High Level Event Manager that imposes the 64K
  1361. >limit, which is in accordance with the design of the HLEventMgr. 
  1362.  
  1363. As Gag Halfrunt, Zaphod Beeblebrox's brain-care
  1364. specialist says, "Twue but Pwobably Iwwevewant..."  this statement is
  1365. somewhat tautological...
  1366.  
  1367. I didn't mean to insult the system software... I like System 7. Do you know
  1368. if there are plans for new transport mechanisms for the AE Mgr that might
  1369. get around this limitation?
  1370.  
  1371. (If you can't talk about it, point to it...)
  1372. - -- 
  1373.          -Paul Potts-potts@itl.itd.umich.edu- 
  1374. "A man must be a little mad if he does not want to be even more stupid."
  1375. - -Montaigne 
  1376.  
  1377. +++++++++++++++++++++++++++
  1378.  
  1379. From: jpugh@apple.com (Jon Pugh)
  1380. Date: 19 Mar 92 21:25:36 GMT
  1381. Organization: Apple Co.
  1382.  
  1383. In article <1992Mar5.164536.6838@terminator.cc.umich.edu>, potts@itl.itd.umich.edu (Paul Potts) writes:
  1384. > >Yes, its true that you cannot send more than 64K of data with Apple
  1385. > >events, but there is nothing in the Apple event Manager, per se, that
  1386. > >makes this limitation. Nor is it a bug. 
  1387. > Well, missing feature then? 
  1388. > >Rather, the Apple event Manager
  1389. > >currently uses the Hight Level Event Manager for its transport
  1390. > >mechanism. It is the High Level Event Manager that imposes the 64K
  1391. > >limit, which is in accordance with the design of the HLEventMgr. 
  1392. > As Gag Halfrunt, Zaphod Beeblebrox's brain-care
  1393. > specialist says, "Twue but Pwobably Iwwevewant..."  this statement is
  1394. > somewhat tautological...
  1395. > I didn't mean to insult the system software... I like System 7. Do you know
  1396. > if there are plans for new transport mechanisms for the AE Mgr that might
  1397. > get around this limitation?
  1398.  
  1399. First off, it is a "design limitation". 
  1400.  
  1401. Second, the transport mechanism is completely seperate. AE runs on ADSP which
  1402. also has no 64K limit.  The problem lies in the event manager.  You use an
  1403. event, you get this limitation.  We could make AE run on IP and it would 
  1404. still be limited to 64K.
  1405.  
  1406. Personally, I think the EPPC needs a minor kick to the head. ;)
  1407.  
  1408. Jon
  1409.  
  1410. ---------------------------
  1411.  
  1412. End of C.S.M.P. Digest
  1413. **********************
  1414.